package com.lagou.cl.servlet;

import com.lagou.cl.pojo.Request;
import com.lagou.cl.pojo.Response;


public abstract class AbstractHttpServlet implements Servlet {

	public abstract void doGet(Request request, Response response);

	public abstract void doPost(Request request, Response response);

	@Override
	public void init() {

	}

	@Override
	public void service(Request request, Response response) {
		if ("GET".equalsIgnoreCase(request.getMethod().trim())) {
			doGet(request, response);
		} else {
			doPost(request, response);
		}
	}

	@Override
	public void destroy() {

	}
}
